package auth

import (
	"github.com/dgrijalva/jwt-go"
)

var (
	JWTMethod = jwt.SigningMethodHS256
	JWTKey    = []byte("xxxxx")
	JWTKin    = "kin"
)

type AuthClaims struct {
	Uid      uint   `json:"uid"`
	Nickname string `json:"nickname"`
	jwt.StandardClaims
}

func KeyFunc(token *jwt.Token) (interface{}, error) {
	return JWTKey, nil
}

func AuthClaimsFactory() jwt.Claims {
	return &AuthClaims{}
}
